<div class="container">
    <div class="row">
        <div id="show" class="span12">
            <?php
            if (isset($nilai) && count($nilai) > 0) {
                ?>
                <h1>Data Guru</h1>
                <table width="400" border="1" class="table table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Materi</th>
                            <th>Benar</th>
                            <th>Salah</th>
                            <th>Nilai</th>
                        </tr>
                    </thead>
                    <?php
                    $i = 0;
                    foreach ($nilai as $row) {
                        $i++;
                        echo "<tr class=\"record\">";
                        echo "<td>$i</td>";
                        echo "<td>$row->materi</td>";
                        echo "<td>$row->benar</td>";
                        echo "<td>$row->salah</td>";
                        echo "<td>$row->nilai</td>";
                        echo "</tr>";
                    }
                    ?>
                </table>
                <?php
            }
            ?>
        </div>
    </div>
</div>